<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib uri="http://commnuity.wanqing.com/tag/toolbar" prefix="tool" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%
response.setHeader("Pragma","No-cache");
response.setHeader("Cache-Control","no-cache"); 
response.setDateHeader("Expires", 0);  
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<html> 
<head>
<base href="<%=basePath %>"/>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<meta http-equiv="pragma" content="no-cache"/>
<meta http-equiv="cache-control" content="no-cache"/> 
<meta http-equiv="expires" content="0"/>  
<title>显示组织树Frame</title>
<jsp:include page="../../../common/easyui-css.inc"></jsp:include>
<style type="text/css"> 
  body, html,#map_canvas {width: 100%;height: 100%;overflow: hidden;margin:0;}
</style>
</head>
<body>
<div>
   <ul id="tree"></ul>
</div>
<div id="mm" class="easyui-menu" style="width:120px;">
  <div id="add_btn" data-options="iconCls:'icon-add-btn'">添加子节点</div>
  <div id="update_btn" data-options="iconCls:'icon-update-btn'">修改节点</div>
  <div id="delete_btn" data-options="iconCls:'icon-delete-btn'">删除节点</div>  
</div>
<div id="addWin" class="easyui-window" style="width: 400px; height: 350px;" data-options="iconCls:'icon-win-depart',closed:true,modal:true,collapsible:false,minimizable:false">
   <div style="margin: 5px 5px 5px 5px;">
   <form name="saveForm" id="saveForm" method="post">  	
	<table class="table_save" width="100%" cellspacing="1" cellpadding="1" border="0">
	<tr id="p_tr" >	
		<td class="td_save" style="text-align: right;">上级组织机构：</td>
		<td>
		  <input type="text" name="pname" id="pname" disabled="disabled" class="input easyui-validatebox"/>
		  <input type="hidden" name="pid" id="pid" />
		  <input type="hidden" name="pcode" id="pcode"/>
		</td>
	</tr>
	<tr>
		<td class="td_save" style="text-align: right;">组织机构名称：</td>
		<td>
			<input type="text" name="orgName" id="orgName" class="input easyui-validatebox" data-options="required:true"/><br/>
		</td>			
	</tr>
	<tr>
		<td class="td_save" style="text-align: right;">组织机构负责人：</td>
		<td>
			<select id="orgManagerId" name="orgManagerId" class="input easyui-validatebox" style="width:99%">	
			   <c:forEach items="${users}" var="user">
			      <option value="${user.id }">${user.userName}</option>
			   </c:forEach>
			 </select>
		</td>			
	</tr>
	<tr>
		<td class="td_save" style="text-align: right;">排序号：</td>
		<td>
			<input type="text" name="seqnum" id="seqnum" value="1" class="input easyui-validatebox" /><br/>
		    <input type="hidden" name="orgId" id="orgId">
		    <input type="hidden" name="orgCode" id="orgCode">
		    <input type="hidden" name="dleaf" id="dleaf">
		</td>			
	</tr>
	<tr>
		<td class="td_save" style="text-align: right;">组织性质：</td>
		<td>
			<select id="orgNature" name="orgNature" class="input easyui-validatebox" style="width:99%">	
			   <c:forEach items="${orgNatureMap}" var="item">
			      <option value="${item.key}">${item.value}</option>
			   </c:forEach>
			 </select>
		</td>			
	</tr>	
	<tr>
		<td class="td_save" style="text-align: right;">组织机构备注：</td>
		<td>
			<textarea rows="2" cols="30" id="orgMemo" name="orgMemo" style="border:0px;width:99%;height:50px;overflow-y:hidden;" onpropertychange="this.style.height=this.scrollHeight + 'px'" oninput="this.style.height=this.scrollHeight + 'px'"></textarea>
		</td>				
	</tr>	
  </table> 
</form>
</div>
<div id="dlg-buttons" style="text-align: center;margin-top: 30px;"> 
    <a id="add_save" href="javascript:void(0)" class="easyui-linkbutton" iconcls="icon-save">保存</a> 
    <a href="javascript:void(0)" class="easyui-linkbutton" onclick="javascript:$('#addWin').window('close')" iconcls="icon-cancel">取消</a> 
</div>
</div>
<div id="updateWin" class="easyui-window" style="width: 400px; height: 350px;" data-options="iconCls:'icon-win-depart',closed:true,modal:true,collapsible:false,minimizable:false">
   <div style="margin: 5px 5px 5px 5px;">
   <form name="updateForm" id="updateForm" method="post">  	
	<table class="table_save" width="100%" cellspacing="1" cellpadding="1" border="0">
	<tr id="p_tr" >	
		<td class="td_save" style="text-align: right;">上级组织机构：</td>
		<td>
		  <input type="text" name="pnameUpdate" id="pnameUpdate" class="input easyui-validatebox"/>
		  <input type="hidden" name="pidUpdate" id="pidUpdate" />
		  <input type="hidden" name="pcodeUpdate" id="pcodeUpdate"/>
		</td>
	</tr>
	<tr>
		<td class="td_save" style="text-align: right;">组织机构名称：</td>
		<td>
			<input type="text" name="orgNameUpdate" id="orgNameUpdate" class="input easyui-validatebox" data-options="required:true"/><br/>
		</td>			
	</tr>
	<tr>
		<td class="td_save" style="text-align: right;">组织机构负责人：</td>
		<td>
			<select id="orgManagerIdUpdate" name="orgManagerIdUpdate" class="input easyui-validatebox" style="width:99%">	
			   <c:forEach items="${users}" var="user">
			      <option value="${user.id }">${user.userName}</option>
			   </c:forEach>
			 </select>
		</td>			
	</tr>
	<tr>
		<td class="td_save" style="text-align: right;">排序号：</td>
		<td>
			<input type="text" name="seqnumUpdate" id="seqnumUpdate" value="1" class="input easyui-validatebox" /><br/>
		    <input type="hidden" name="orgIdUpdate" id="orgIdUpdate">
		    <input type="hidden" name="orgCodeUpdate" id="orgCodeUpdate">
		    <input type="hidden" name="dleafUpdate" id="dleafUpdate">
		</td>			
	</tr>
	<tr>
		<td class="td_save" style="text-align: right;">组织性质：</td>
		<td>
			<select id="orgNatureUpdate" name="orgNatureUpdate" class="input easyui-validatebox" style="width:99%">	
			   <c:forEach items="${orgNatureMap}" var="item">
			      <option value="${item.key}">${item.value}</option>
			   </c:forEach>
			 </select>
		</td>			
	</tr>	
	<tr>
		<td class="td_save" style="text-align: right;">备注：</td>
		<td>
			<textarea rows="2" cols="30" id="orgMemoUpdate" name="orgMemoUpdate" style="border:0px;width:99%;height:50px;overflow-y:hidden;" onpropertychange="this.style.height=this.scrollHeight + 'px'" oninput="this.style.height=this.scrollHeight + 'px'"></textarea>
		</td>				
	</tr>	
  </table> 
</form>
</div>
<div id="dlg-buttons" style="text-align: center;margin-top: 30px;"> 
    <a id="update_save" href="javascript:void(0)" class="easyui-linkbutton" iconcls="icon-save">保存</a> 
    <a href="javascript:void(0)" class="easyui-linkbutton" onclick="javascript:$('#updateWin').window('close')" iconcls="icon-cancel">取消</a> 
</div>
</div>
</body>
<jsp:include page="../../../common/easyui-js.inc"></jsp:include>
<script type="text/javascript" src="pages/sys/org/index.js?version=<%=Math.random() %>"></script>
</html>